package com.youlu.campus.web.university.controller;

import com.youlu.campus.web.university.dto.DicQueryRequest;
import com.youlu.campus.web.university.service.DictionaryService;
import com.yuelin.infrastructure.quantum.common.QResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 字典管理
 * @author: YangJ
 * @date: 2020/12/10 13:49
 */
@RestController
public class DictionaryController {

    @Autowired
    private DictionaryService  dictionaryService;

    /**
     * 获取专业信息
     * 备注：获取专业信息
     * 参数：request - 专业查询请求类
     */
    @PostMapping("/public/query-major")
    public QResult queryMajor(@RequestBody DicQueryRequest request) {
        return QResult.success(dictionaryService.queryMajor(request));
    }

    /**
     * 获取兴趣标签信息
     * 备注：获取兴趣标签信息
     */
    @GetMapping("/mini-app/label/list")
    public QResult labelList() {
        return QResult.success(dictionaryService.labelList());
    }
}